<? 
	session_start();
	require("Admin/connect.php");		
	$madkt=$_REQUEST["madkt"];
	$diem=$_POST["diem"];
	$result=mysql_query("select * from diemkt where madkt='{$madkt}'");					
	$r=mysql_fetch_array($result);
	$result2=mysql_query("select * from hocsinh where mahs='{$r["mahs"]}'");
	$r2=mysql_fetch_array($result2);
	$sql="update diemkt set diem='{$diem}' where madkt='{$madkt}'";			
	mysql_query("$sql") or die("Error!");	
	mysql_close();
	header("Location:chitietquanlydiemktgv.php?mamh={$r["mamh"]}&mal={$r2["mal"]}");	
?>